16. Exploring the Database

Take a look at the database below and then answer the following questions:

{  
   "questions": {  
      "ABCDakarandomkey": {  
         "question": "Who was the 13th president of the United States?",
         "choice_1": "Millard Fillmore",
         "choice_2": "Zachary Taylor",
         "choice_3": "Franklin Pierce",
         "choice_4" :"James K. Polk",
         "answer" :"choice_1"
      },
      "EFGHakarandomkey": {  
         "question": "In what year was the first gasoline combustion engine invented?",
         "choice_1": "1769",
         "choice_2": "1886",
         "choice_3": "1807",
         "choice_4": "1864",
         "answer": "choice_4"
      }
   },
   "players": {  
      "user_key_1": {  
         "name": "Person",
         "opponents": {  
            "IJKLakarandomkey": "user_key_2",
            "MNOPakarandomkey": "user_key_6"
         },
         "questions": {  
            "ABCDakarandomkey": "Correct",
            "EFGHakarandomkey": "Incorrect"
         }
      },
      "user_key_2": {  
         "name": "Mai",
         "opponents": {  
            "QRAAakarandomkey": "user_key_1",
            "SQUEakarandomkey": "user_key_6"
         },
         "questions": {  
            "ABCDakarandomkey": "Incorrect",
            "EFGHakarandomkey": "Incorrect"
         }
      }
   },
   "opponents": {  
      "couple_Key_1": "user_key_1_user_key_2",
      "user_1": "user_key_1",
      "user_2": "user_key_2",
      "winner": "user_key_1"
   }
}

Question 1

Select the all of the nodes that are direct children of the players node:

SOLUTION:
  • user_key_1
  • user_key_2

Question 2

What path refers to the key/value pair 'choice_4: "1864" '

SOLUTION: /questions/EFGHakarandomkey/choice_4

Questions 3

What is the value of the key at the path /questions/ABCDakarandomkey/answer ?

SOLUTION: choice_1

Question 4

QUESTION:

What kind of app could this database belong to?

ANSWER:

This is likely a database for a trivia game or competition app of some type. Answers that would fit are a trivia game, a video game, app for quiz bowl, etc.